package com.xyyhome.web.system.domain;

import javax.persistence.*;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_params", schema = "xyyhome", catalog = "")
public class YSParams {
    private String yspKey;
    private String yspValue;
    private String yspParent;

    @Id
    @Column(name = "ysp_key", nullable = false, length = 36)
    public String getYspKey() {
        return yspKey;
    }

    public void setYspKey(String yspKey) {
        this.yspKey = yspKey;
    }

    @Basic
    @Column(name = "ysp_value", nullable = true, length = 36)
    public String getYspValue() {
        return yspValue;
    }

    public void setYspValue(String yspValue) {
        this.yspValue = yspValue;
    }

    @Basic
    @Column(name = "ysp_parent", nullable = true, length = 36)
    public String getYspParent() {
        return yspParent;
    }

    public void setYspParent(String yspParent) {
        this.yspParent = yspParent;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSParams ysParams = (YSParams) o;

        if (yspKey != null ? !yspKey.equals(ysParams.yspKey) : ysParams.yspKey != null) return false;
        if (yspValue != null ? !yspValue.equals(ysParams.yspValue) : ysParams.yspValue != null) return false;
        if (yspParent != null ? !yspParent.equals(ysParams.yspParent) : ysParams.yspParent != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = yspKey != null ? yspKey.hashCode() : 0;
        result = 31 * result + (yspValue != null ? yspValue.hashCode() : 0);
        result = 31 * result + (yspParent != null ? yspParent.hashCode() : 0);
        return result;
    }
}
